package cz.via.wowss.helper;

import java.util.Random;

public class EventGenerator implements Runnable {

	private static final double CHANCE = 0.05;
	private static final Random RANDOM = new Random();

	public void run() {
		while (true) {
			if (RANDOM.nextDouble() > CHANCE)
				continue;
			Event.next().apply();
			try {
				Thread.sleep(600000);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
	}
}
